<%@ page import="com.broadvision.emarketing.criteriabuilder.*" %>
<%@ page import="org.apache.struts.taglib.TagUtils" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>

<SCRIPT language='Javascript'>
    function cancelAction(){
	form = document.forms["emConditionBranchForm"];
	form.action="<html:rewrite page="/em/cb/displayCriteriaBuilder.do"/>";
	form.submit();
    }

</SCRIPT>

<%String actionStr = ""; %>
<logic:equal name="emConditionBranchForm" property="actionType" value="edit" >
  <% TagUtils util = TagUtils.getInstance();
     actionStr = util.message(pageContext, "em", request.getLocale().toString(),"em.label.edit");
   %>
</logic:equal>
<logic:equal name="emConditionBranchForm" property="actionType" value="create" >
  <% TagUtils util = TagUtils.getInstance();
	actionStr = util.message(pageContext, "em", request.getLocale().toString(),"em.label.create");
   %>
</logic:equal>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="zoneFive">
	<tr>
		<td valign="top" width="100%">
		<div class="pageTitle">
			<%=actionStr%> 
			<bean:message bundle="em" key="emarketing.criteriaBuilder.genericConditionList.label.conditionList" /><br>
		</div>
		<div class="pageInstructions">
			</br>
		</div>
            
            	<div class="pageSubTitle">
			<%=actionStr%> 
			<bean:message bundle="em" key="emarketing.criteriaBuilder.genericConditionList.label.conditionList" />
		</div>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="labelForm">

		<html:form action="/em/cb/updateConditionBranch.do">
			<html:hidden name="emConditionBranchForm" property="key" />
			<html:hidden name="emConditionBranchForm" property="actionType" />
			<tr>
				<td><html:errors /></td>
			</tr>
			<tr>
				<td valign="top" wrap class="label" width="20%">
					<bean:message bundle="em" key="emarketing.criteriaBuilder.genericConditionList.label.criteriaMeets"/>
				</td>
				<td valign="top" wrap class="labelField" width="80%">
				<html:select name="emConditionBranchForm" property="operator" size="1">
					<html:option value="AND"><bean:message bundle="em" key="emarketing.criteriaBuilder.genericConditionList.option.all"/></html:option>
					<html:option value="OR"><bean:message bundle="em" key="emarketing.criteriaBuilder.genericConditionList.option.any"/></html:option>
				</html:select>
				<bean:message bundle="em" key="emarketing.criteriaBuilder.genericConditionList.label.ofTheFollowingConditions"/>:</td>
				</td>
			</tr>	
		</table>
		<div class="pageButtonWrap" align="right">
			<input type="button" name="Reset" value="<bean:message bundle="em" key="button.cancel"/>"
						class="inputButton" onclick="javascript:cancelAction()" /> 
			<input type="submit" name="Continue" value="<bean:message bundle="em" key="button.done"/>" class="inputButton" />
		</div>

		</html:form>
	</td>
	</tr>
</table>

